package PTA.javabianchengjichu2;

import java.util.Scanner;

public class ex32 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
      String str = sc.nextLine();
      String []arr = str.split("\\s+");
      int a = Integer.parseInt(arr[0]);
      int c = Integer.parseInt(arr[2]);
        switch (arr[1]){
            case"&":
                System.out.println(a+" & "+c+" = "+(a&c));
                break;
            case"|":
                System.out.println(a+" | "+c+" = "+(a|c));
                break;
            case"^":
                System.out.println(a+" ^ "+c+" = "+(a^c));
                break;
            default:
                System.out.println("ERROR");
                break;

        }


    }
}
